﻿using MediatR;
using RBAC.LuFang.API.Application.Command.UserCommand;
using RBAC.LuFang.Domain;
using RBAC.LuFang.Domin.Services;

namespace RBAC.LuFang.API.Application.CommandHandlers.UserHandler
{
    //显示市
    public class TheCitySelectCommandHandler:IRequestHandler<TheCitySelectCommand, List<TheCity>>
    {
        private readonly IUserService _userService;

        public TheCitySelectCommandHandler(IUserService userService)
        {
            _userService = userService;
        }

        public async Task<List<TheCity>> Handle(TheCitySelectCommand request, CancellationToken cancellationToken)
        {
            return await _userService.GetTheCity(request.pid);
        }
    }
}
